import React from 'react'

import Star from '../../star'

import './style.scss'

class Item extends React.Component{
    constructor(props, context){
        super(props, context)
    }
    render() {
        const data = this.props.data
        return (
            <div className="comment-item">
                <div>
                    <i className="icon iconfont icon-wodedamaijihuo"></i>
                    <span>{data.user}</span>
                </div>
                <Star star={data.star}></Star>
                <p>{data.desc}</p>
            </div>
        )
    }
    componentDidMount() {
        // console.log(this.props.data)
    }
}

export default Item